<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>TwinIOC-API代码示例-自定义时间轴</title>

    <link rel="stylesheet" href="../css/common.css" />
    <script src="../public/tgapp/TGApp.min.js"></script>
    <script src="../js/TwinIOCApp.min.js"></script>
    <script src="../js/config.js"></script>
    <script src="./index.js"></script>

    <!-- 引入 bootstrap -->
    <link rel="stylesheet" href="../css/bootstrap.min.css" />
    <script src="../lib/bootstrap.bundle.min.js"></script>

    <style>
      ::selection {
        background: transparent !important;
      }

      /* 场景加载loading start */
      #mask {
        display: none;
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        left: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 10;
        color: #ccc;
        font-size: 16px;
      }

      .avw-loader section {
        line-height: 1;
      }
      /* 场景加载loading end */

      /* 左侧面板 start */
      .left-panel-container {
        position: absolute;
        top: 10%;
        left: 10px;
        display: none;
        background: rgba(12, 12, 20, 0.85);
        width: 338px;
        height: calc(100% - 252px);
        color: #fff;
        /* overflow-y: auto; */
        padding: 3px;
      }

      .card {
        height: 100%;
        border: 0;
        border-radius: 0;
      }
      .card .card-header {
        height: 46px;
        line-height: 46px;
        background: #16161d;
        border: 1px solid #42424f;
        border-radius: 0;
        color: #fff;
        padding: 0 10px;
      }
      .card-header .title-name {
        font-size: 16px;
        color: #fff;
        font-weight: bold;
      }
      .card-body {
        padding: 0;
        height: 100%;
        overflow-y: auto;
      }
      /* 左侧面板 end */

      /* 时间轴 start */

      .start-btn {
        width: 48px;
        height: 48px;
        margin-right: 10px;
        float: left;
        margin-top: 5px;
        border-radius: 50%;
        position: relative;
        cursor: pointer;
        border: 2px solid #00accc;
      }

      .playBack {
        border-left: 12px solid transparent;
        border-right: 12px solid transparent;
        border-bottom: 17px solid #00accc;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-45%, -50%) rotate(90deg);
      }

      .pause {
        display: block;
        font-weight: bold;
        font-size: 32px;
        color: #00accc;
        position: absolute;
        display: none;
        top: 50%;
        left: 50%;
        transform: translate(-45%, -50%) rotate(90deg);
      }

      .suspend-btn {
        width: 48px;
        height: 48px;
        margin-right: 10px;
        float: left;
        margin-top: 5px;
        border-radius: 50%;
        position: relative;
        cursor: pointer;
        border: 2px solid #00accc;
      }

      .suspend-icon {
        width: 16px;
        height: 16px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: #00accc;
      }

      .time-btn {
        bottom: 21px;
        position: absolute;
        width: auto !important;
        height: auto !important;
        left: 15px;
        display: inline-block;
      }

      .time-panel {
        position: absolute;
        bottom: 28px;
        width: 100%;
        height: 120px;
        background: rgba(0, 0, 0, 0.5);
        color: #fff;
        display: none;
        box-sizing: border-box;
      }

      .time-panel span {
        font-size: 14px;
      }

      .time-panel .time-line {
        position: absolute;
        left: 196px;
        right: 246px;
        top: 50px;
        height: 48px;
      }

      .time-panel .time-line > div {
        position: absolute;
        top: 16px;
        width: 100%;
        height: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
      }

      .time-panel .time-line hr {
        position: absolute;
        top: 5px;
        width: 100%;
        height: 6px;
        border-radius: 3px;
        background: #777777;
        border: none;
        outline: none;

        margin: 0;
        opacity: 1;
      }

      .time-panel .time-line .complete {
        background: #00add9;
      }

      .time-panel .times {
        position: absolute;
        bottom: 5px;
        left: 196px;
        right: 246px;
        display: flex;
        align-items: center;
        justify-content: space-between;
      }

      .time-panel .mark {
        z-index: 1;

        padding: 0;
        background-color: transparent;
      }

      .time-panel .mark img {
        position: absolute;
        right: 0;
      }

      .zoom-list {
        width: auto;
        height: 40px;
        display: block;
        position: absolute;
        right: 25px;
        bottom: 30px;
      }

      .zoom-list div {
        width: 50px;
        height: 40px;
        background: #032a3b;
        border-top: 2px solid #007d9d;
        float: left;
        line-height: 3;
        margin: 3px;
        text-align: center;
        cursor: pointer;
        box-sizing: border-box;
      }

      .zoom-list div.active {
        background-color: #007d9d;
        border-top: 2px solid rgb(0, 42, 52);
      }

      /* 时间轴 end */
    </style>
  </head>

  <body>
    <div class="app" id="app">
      <!-- 头部 -->
      <div class="header-wrap">
        <a href="//www.twinioc.net" target="_blank">TwinIOC</a><span>-API代码示例-自定义时间轴</span><br />
        <span class="ctrl">显示时间轴</span>
        <!-- <img src="../../image/tuguan.png" /> -->
      </div>

      <div id="mask">
        <!-- 加载Loding -->
        <div class="avw-loader">
          <section><span class="loader-112">L &nbsp; ading </span></section>
        </div>

        <!-- 进度条dom暂时不能删除，twinioc.js 会获取这个dom进行设置进度条 删除时会报错 -->
        <div class="progress-wrap" style="opacity: 0">
          <p>场景加载中...</p>
          <div class="bar-outer">
            <div class="bar-inner"></div>
          </div>
          <p class="value"></p>
        </div>
      </div>

      <!-- 场景 -->
      <div id="container"></div>

      <!-- 左侧功能面板 -->
      <div class="left-panel-container">
        <div class="card">
          <!-- 标题 -->
          <div class="card-header text-primary">
            <div class="title-name">对象列表</div>
          </div>
          <div class="card-body">
            <!-- 对象列表 -->
            <div class="accordion left-panel twin-object" id="objectAccordion"></div>
          </div>
        </div>
      </div>

      <!-- 下方时间轴 -->
      <div class="time-panel" v-cloak>
        <span class="time-btn">
          <div class="start-btn" onclick="onPlayClick()">
            <div class="pause">＝</div>
            <div class="playBack"></div>
          </div>
          <div class="suspend-btn" onclick="onResetClick()">
            <div class="suspend-icon"></div>
          </div>
        </span>
        <div class="times">
          <span class="start-time"></span>
          <span class="current-time"></span>
          <span class="end-time"></span>
        </div>
        <div class="time-line">
          <div class="line">
            <hr />
          </div>
          <div class="mark">
            <hr class="complete" />
            <div
              id="imageId"
              style="
                width: 20px;
                height: 20px;
                right: 0px;
                position: absolute;
                border-radius: 100%;
                background: rgb(204, 204, 204, 0.5);
                border-radius: 50px;
                transform: translateX(50%);
              "
            >
              <div style="border-radius: 100%; background: #ffffff; width: 12px; height: 12px; transform: translate(4px, 4px)"></div>
            </div>
            <!-- <img  src="" /> -->
          </div>
        </div>
        <span class="zoom-list">
          <div class="zoomClass" onclick="onSpeedClick(1)">X1</div>
          <div class="zoomClass" onclick="onSpeedClick(2)">X2</div>
          <div class="zoomClass" onclick="onSpeedClick(3)">X4</div>
        </span>
      </div>

      <!-- 底部 -->
      <div class="footer-box">
        <span>基于孪易数字孪生应用开发引擎构建 https://www.twinioc.net</span>
        <span>版权所有 北京数字冰雹信息技术股份有限公司</span>
      </div>
    </div>
  </body>
</html>
<style>
  html,
  body {
    background-color: #00000000;
  }
</style>
